<?php
/**
 * @Author: Marte
 * @Date:   2017-08-13 13:22:28
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-13 14:13:07
 */
session_start();
if(!isset($_POST["submit"])){
      exit('非法访问!');
  }

$_headicon=$_POST['country'];//获取图片路径
header('Content-Type:text/html;charset=utf-8');
include "../config_connect.php";//导入数据库
$username=$_SESSION['username'];//取得session
 $_sql1='update userregisters set headicon="'.$_headicon.'" where username="'.$username.'"';
if($_mysql->query($_sql1))
{
    echo "<script>location='../../person.php?change=3&change=3';</script>";
}else{
    echo "fail";
}



?>